//package com.alibaba.cirtus.ots.application.app.ability.facade;
//
//import com.alibaba.cz.base.tool.log.Log;
//import com.alibaba.fastjson.JSON;
//import com.alibaba.fastjson.JSONObject;
//import com.alibaba.lattice2.epoch.sdk.model.Result;
//import com.epoch.app.otsapplicationappsdk.inventorydetail.dto.RenderRequest;
//import com.epoch.app.otsapplicationappsdk.inventorydetail.service.InventoryDetailService;
//import com.epoch.app.otsunifiedinventory.dto.request.AloocateOrderGetTransRequest;
//import com.epoch.app.otsunifiedinventory.model.dto.AloocateOrderGetTransResponse;
//import com.epoch.app.otsunifiedinventory.service.OtsUnifiedInventoryService;
//import org.apache.commons.collections.CollectionUtils;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//
//import java.util.List;
//
//@Service
//public class InventoryDetailServiceImpl implements InventoryDetailService {
//
//    @Autowired
//    private OtsUnifiedInventoryService otsUnifiedInventoryService;
//
//    private static Log log = Log.getLogger(InventoryDetailServiceImpl.class);
//
//    @Override
//    public Object render(RenderRequest renderRequest) {
//        JSONObject result = new JSONObject();
//        JSONObject jsonObject = JSONObject.parseObject(JSON.toJSONString(renderRequest.getAttr()));
//        String receiveAreaId = jsonObject.getString("receiveAreaId");
//        String scItemId = jsonObject.getString("scItemId");
//        try {
//            AloocateOrderGetTransRequest request = new AloocateOrderGetTransRequest();
//            request.setReceiveAreaId(receiveAreaId);
//            request.setCode("");
//            request.setScItemId(scItemId);
//            log.info("render_otsUnifiedInventoryService.getTransOrders$request:" + JSON.toJSONString(request));
//            Result<List<AloocateOrderGetTransResponse>> response = otsUnifiedInventoryService.getTransOrders(request);
//            log.info("render_otsUnifiedInventoryService.getTransOrders$response:" + JSON.toJSONString(response));
//            result.put("itemList", response.getResult());
//            result.put("success", CollectionUtils.isNotEmpty(response.getResult()));
//        }catch (Exception e){
//            result.put("success", false);
//            result.put("msg",e.getMessage());
//        }
//        return result;
//    }
//}
